/*
 * @Author: Jiraiya
 * @Date: 2020-03-17 12:31:26
 * @LastEditors: Jiraiya
 * @LastEditTime: 2020-03-17 14:57:18
 * @Description: 
 */

class Random{
    constructor(){
        this.i = 5
    }
    
    // [Symbol.iterator] = function *f(){
    //     yield 1
    //     yield 2
    // }

    [Symbol.iterator](){return this}

    next(){
        let i = 5
        while(this.i>0){
            this.i--
            return {value: Math.random(), done: false}
        }
        return {value: undefined, done: true}
    }
}

export default Random

// module.exports = Random